package Guigu6.Extends;

public class Man {

	String name;
	private int age;
	
	public Man()
	{
		
	}
	
	public Man(String name,int age)
	{
		this.name = name;
		this.age = age;
	}
	
	public void eat()
	{
		System.out.println("吃饭");
		sleep();
	}
	
	private void sleep()
	{
		System.out.println("睡觉");
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}
}
